<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1,user-scalable=no,maximum-scale=1,initial-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    {php echo register_jssdk(false);}
    <meta name="description" content="{if $title}{$title}{else}{if !empty($_W['account']['name'])}{$_W['account']['name']}{/if}{/if}{if $_W['account']['siteinfo']['sitename']}{$_W['account']['siteinfo']['sitename']}{/if}">
    <link rel="stylesheet" href="{RES}css/common.css?v=20150320">
    <link rel="stylesheet" href="{RES}css/site.css?v=20150320">
    <link rel="stylesheet" href="http://static.resource.qudao.weijuju.com/css/plugin/swipeslide.css?v=20150401">
    <script type="text/javascript" src="http://static.resource.qudao.weijuju.com/js/plugin/zepto.min.js?v=20150401"></script>
    <script type="text/javascript" src="http://static.resource.qudao.weijuju.com/js/plugin/swipeslide.js?v=20150401"></script>
    <style>
        .bgcolor {
            background-color: rgb(233, 86, 68);
        }

        .fontcolor {
            color: rgb(233, 86, 68);
        }
    </style>

    <title>{if $title}{$title}{else}{if !empty($_W['account']['name'])}{$_W['account']['name']}{/if}{/if}{if $_W['account']['siteinfo']['sitename']}{$_W['account']['siteinfo']['sitename']}{/if}</title>
</head>
<body>
<div id="page">
    <div id="image" class="swipe ui-swipeslide ui-swipeslide-horizontal" style="visibility: visible;">
        <div class="swipe-wrap ui-swipeslide-reel" data-id="0"  style="width: 1690px; -webkit-transform: translate3d(0px, 0px, 0px); -webkit-transition-property: -webkit-transform; transition-property: -webkit-transform; -webkit-transition-duration: 0.4s; transition-duration: 0.4s; -webkit-transition-timing-function: ease-out; transition-timing-function: ease-out;">
            {loop $advlist $adv}
            <div class="swipe-item ui-swipeslide-slide" style="width: 338px;">
                <a href="{$adv[link]}">
                    <img align="absmiddle" src="{php echo strpos($adv['thumb'], 'http://') === FALSE ? ($_W['attachurl'].$adv['thumb']) : $adv['thumb']}" style="height:154px" >
                </a>
                <div class="bottom">
                    <div class="title">{$adv[title]}</div>
                </div>
            </div>
            {/loop}
        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            $('#image').swipeSlide({autoPlay: 3, delay: 0.4});
        });
    </script>

    <style>
        #mainmenu li {
            height: 71px;
            padding: 0 0 0 80px;
            list-style: none;
            position: relative;
            border-top: 1px solid #dbdbdb;
            background-color: #FFF;
        }

        #mainmenu li:first-child {
            border: none;
            -webkit-border-radius: 6px 6px 0px 0px;
            border-radius: 6px 6px 0px 0px;
        }

        #mainmenu li:last-child {
            -webkit-border-radius: 0px 0px 6px 6px;
            border-radius: 0px 0px 6px 6px;
        }

        #mainmenu li a {
            display: block;
        }

        #mainmenu li .title {
            line-height: 45px;
            font-weight: 700;
        }

        #mainmenu li .summary {
            margin-top: 0px;
            font-size: 12px;
            overflow: hidden;
            height: 20px;
            white-space: nowrap;
        }

        #mainmenu li img {
            width: 65px;
            position: absolute;
            top: 10px;
            left: 10px;
            max-height: 45px;
        }
    </style>
    <div id="mainmenu" class="fn-clear">
        <ul>
        {data func="amouse_article_site_category" parentid=$cid return="true" assign="navs"}
        {if empty($navs)}

            {data module="amouse_article" func="amouse_article_site_article" cid=$cid return="true" assign="result"}
            {loop $result['list'] $row}
            <li>
                <a href="{php echo $this->createMobileUrl("detail",array("id" => $row['id']),true)}">
                <p class="title" title="{$row[title]}">{php echo cutstr($row[title],12)} </p>
                <p class="summary" title="{$row[description]}">{php echo cutstr($row[description],12)}</p>
                {if !empty($row['thumb'])}
                <img src="{php echo strpos($row['thumb'],'http://')===FALSE?($_W['attachurl'].$row['thumb']):$row['thumb']}" height="65" width="45"/>
                {/if}
                <div class="right-arrow"></div>
                </a>
            </li>
            {/loop}
        {else}
        {loop $navs $nav}
        <li>
            <a href="{php echo $this->createMobileUrl("second",array("parentid"=>$nav['parentid'],"cid" => $nav['id']),true)}">
            <p class="title"  title="{$nav[name]}"> {php echo cutstr($nav[name],12)}</p>
            <p class="summary" title="{$nav[description]}">
                {php echo cutstr($nav[description],6)} </p>
            {if !empty($nav['thumb'])}
            <img src="{php echo strpos($nav['thumb'],'http://')===FALSE?($_W['attachurl'].$nav['thumb']):$nav['thumb']}" height="65" width="45"/>
            {/if}
            <div class="right-arrow"></div>
            </a>
        </li>
        {/loop}
        {/if}
        </ul>
    </div>

    <div id="footer">Copyright © {if !empty($set['copyright'])} {$set['copyright']} {else}{$_W['account']['name']}{/if}
    </div>
</div>


<div id="toTop" style="position: fixed; display: none; bottom: 0px; left: 10px; z-index: 998; opacity: 0.8;">
    <a href="javascript:void(0);" onclick="javascript:window.scrollTo(0,0);">
        <img style="width:46px;height:46px;"  src="{RES}images/topplus.png" align="absmiddle">
    </a>
</div>

<style>
    body, #mainmenu {
        background: rgba(0, 0, 0, 0);
    }
</style>

<script language='javascript'>

    wx.ready(function () {
        shareMeta = {
            imgUrl:"{$shareimg}",
            link:"{$url}",
            desc:"{if !empty($category['description'])}{$category['description']}{else}{$_W['account']['name']}的精美图文{/if}",
            title:"{if !empty($category['title'])}{$category['title']}{else}{$_W['account']['name']}的精美图文{/if}",
            success: function(){

            },
            cancel: function(){
                // alert("分享失败，可能是网络问题，一会儿再试试？");
            }
        };
        wx.onMenuShareTimeline(shareMeta);
        wx.onMenuShareAppMessage(shareMeta);
        wx.onMenuShareWeibo(shareMeta);
        wx.onMenuShareQQ(shareMeta);
        wx.onMenuShareQZone(shareMeta);
    });
</script>
</body>
</html>